﻿<phone:PhoneApplicationPage xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"  
    x:Class="sodexo.PageResult"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="480"
    shell:SystemTray.IsVisible="True" Loaded="PhoneApplicationPage_Loaded" BackKeyPress="PhoneApplicationPage_BackKeyPress">

    <!--LayoutRoot 是包含所有页面内容的根网格-->
    <Grid x:Name="LayoutRoot" Opacity="1">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Grid.Background>
            <ImageBrush ImageSource="/Images/background.jpg"/>
        </Grid.Background>
        <!--TitlePanel 包含应用程序的名称和页标题-->
        <StackPanel x:Name="TitlePanel" Margin="12,17,0,28" Grid.ColumnSpan="2">
            <TextBlock x:Name="ApplicationTitle" Text="索迪斯联盟商户信息" Style="{StaticResource PhoneTextNormalStyle}"/>
            <TextBlock x:Name="PageTitle" Text="" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}" FontSize="58" />
        </StackPanel>

        <!--ContentPanel - 在此处放置其他内容-->
        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0" Grid.ColumnSpan="2">
            <ListBox HorizontalAlignment="Stretch" Margin="-4,6,0,0" Name="listBoxResult" VerticalAlignment="Stretch" DataContext="{Binding}" Padding="0,0,0,20" SelectionChanged="listBoxResult_SelectionChanged">
                <ListBox.ItemTemplate>
                    <DataTemplate>
                        <StackPanel>
                            <TextBlock Text="{Binding Name}" TextWrapping="Wrap" FontSize="40" FontWeight="Bold" />
                            <TextBlock Text="{Binding Address }" TextWrapping="Wrap" FontSize="20" />
                            <StackPanel Orientation="Horizontal">
                                <TextBlock Text="电话："/> 
                                <TextBlock Text="{Binding PhoneNumber}" FontSize="15" />
                            </StackPanel>
                            <toolkit:ContextMenuService.ContextMenu>
                                <toolkit:ContextMenu IsFadeEnabled="False">
                                    <toolkit:MenuItem Header="拨打电话" Click="MenuItem_Click" />
                                    <toolkit:MenuItem Header="复制地址" Click="MenuItem_Click_Copy" />
                                </toolkit:ContextMenu>
                            </toolkit:ContextMenuService.ContextMenu>
                        </StackPanel>
                    </DataTemplate>
                </ListBox.ItemTemplate>
            </ListBox>
        </Grid>
        <Grid x:Name="ProgressBarPanel" Grid.Row="1" Grid.ColumnSpan="2">
            <toolkit:PerformanceProgressBar Name="performanceProgressBarUpdate" Height="8" IsIndeterminate="True" Margin="0,585,0,14" />
        </Grid>
    </Grid>
 
    <!--演示 ApplicationBar 用法的示例代码-->
    <!--<phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
            <shell:ApplicationBarIconButton IconUri="/Images/appbar_button1.png" Text="按钮 1"/>
            <shell:ApplicationBarIconButton IconUri="/Images/appbar_button2.png" Text="按钮 2"/>
            <shell:ApplicationBar.MenuItems>
                <shell:ApplicationBarMenuItem Text="菜单项 1"/>
                <shell:ApplicationBarMenuItem Text="菜单项 2"/>
            </shell:ApplicationBar.MenuItems>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>-->

</phone:PhoneApplicationPage>
